<?php
namespace BP\En;
require_once("BP/Tools/DateUtils.php");
require_once("java/util/Date.php");
class Map {
	public $XmlFile;	// String
	protected $_IsAllowRepeatNo;	// boolean
	public $SelectSQL;	// String
	public $IsSimpleAttrs;	// boolean
	public $_FK_MapData;	// String
	protected $_FormShowType;	// FormShowType
	protected $_DepositaryOfEntity;	// Depositary
	protected $_DepositaryOfMap;	// Depositary
	protected $_attrsOfSearch;	// AttrsOfSearch
	protected $_SearchAttrs;	// AttrSearchs
	protected $_MaxTBLength;	// int
	protected $_HisPhysicsAttrs;	// Attrs
	protected $_HisFKAttrs;	// Attrs
	protected $_isFull;	// int
	public $HisBPEntityAthType;	// BPEntityAthType
	public $FJSavePath;	// String
	public $TitleExt;	// String
	protected $_isJs;	// int
	public $IsAddRefName;	// boolean
	protected $_HisEnumAttrs;	// Attrs
	protected $_HisFKEnumAttrs;	// Attrs
	protected $_HisCfgAttrs;	// Attrs
	protected $_HisRefAttrs;	// Attrs
	protected $_RefMethods;	// RefMethods
	protected $_Dtls;	// EnDtls
	protected $_DtlsAll;	// EnDtls
	protected $_AttrsOfOneVSM;	// AttrsOfOneVSM
	protected $_AdjunctType;	// AdjunctType
	public $MoveTo;	// String
	public $IndexField;	// String
	protected $_EnDesc;	// String
	public $IsEnableVer;	// boolean
	public $IsShowSearchKey;	// boolean
	public $DTSearchWay;	// BP.Sys.DTSearchWay
	public $DTSearchLable;	// String
	public $DTSearchKey;	// String
	public $Icon;	// String
	protected $_EnType;	// EnType
	protected $PKs;	// String
	protected $_GenerNoLength;	// int
	protected $_CodeStruct;	// String
	protected $_IsAllowRepeatName;	// boolean
	protected $_IsAutoGenerNo;	// boolean
	protected $_IsCheckNoLength;	// boolean
	protected $_EnDBUrl;	// DBUrl
	protected $_PhysicsTable;	// String
	protected $_attrs;	// Attrs
	protected $_HisAttrFiles;	// AttrFiles
	private function __init() { // default class members
		$this->XmlFile = NULL;
		$this->SelectSQL = NULL;
		$this->IsSimpleAttrs =  FALSE ;
		$this->_FK_MapData = NULL;
		$this->_FormShowType = $FormShowType->NotSet;
		$this->_DepositaryOfEntity = $Depositary->None;
		$this->_DepositaryOfMap = $Depositary->Application;
		$this->_attrsOfSearch = NULL;
		$this->_SearchAttrs = NULL;
		$this->_MaxTBLength = 0;
		$this->_HisPhysicsAttrs = NULL;
		$this->_HisFKAttrs = NULL;
		$this->_isFull = -1;
		$this->HisBPEntityAthType = BPEntityAthType::$None;
		$this->FJSavePath = NULL;
		$this->TitleExt = NULL;
		$this->_isJs = -1;
		$this->IsAddRefName =  FALSE ;
		$this->_HisEnumAttrs = NULL;
		$this->_HisFKEnumAttrs = NULL;
		$this->_HisCfgAttrs = NULL;
		$this->_HisRefAttrs = NULL;
		$this->_RefMethods = NULL;
		$this->_Dtls = NULL;
		$this->_DtlsAll = NULL;
		$this->_AttrsOfOneVSM = AttrsOfOneVSM::constructor__();
		$this->_AdjunctType = AdjunctType::$None;
		$this->MoveTo = NULL;
		$this->IndexField = NULL;
		$this->_EnDesc = "";
		$this->IsEnableVer =  FALSE ;
		$this->IsShowSearchKey =  TRUE ;
		$this->DTSearchWay = DTSearchWay->None;
		$this->DTSearchLable = "日期�?";
		$this->DTSearchKey = "";
		$this->Icon = "../Images/En/Default.gif";
		$this->_EnType = EnType::$App;
		$this->PKs = "";
		$this->_GenerNoLength = 0;
		$this->_CodeStruct = "2";
		$this->_IsAllowRepeatName =  TRUE ;
		$this->_IsAutoGenerNo =  FALSE ;
		$this->_IsCheckNoLength =  FALSE ;
		$this->_EnDBUrl = NULL;
		$this->_PhysicsTable = NULL;
		$this->_attrs = NULL;
		$this->_HisAttrFiles = NULL;
	}
	public function SetHelperUrl ($key, $url) // [String key, String url]
	{
		$attr = $this->GetAttrByKey($key);
		$attr->HelperUrl = $url;
	}
	public function SetHelperBaidu_String ($key) // [String key]
	{
		$attr = $this->GetAttrByKey($key);
		$attr->HelperUrl = ("http://www.baidu.com/s?word=ccflow " . $attr->getDesc());
	}
	public function SetHelperBaidu_String_String ($key, $keyword) // [String key, String keyword]
	{
		$attr = $this->GetAttrByKey($key);
		$attr->HelperUrl = ("http://www.baidu.com/s?word=" . $keyword);
	}
	public function SetHelperAlert ($key, $context) // [String key, String context]
	{
		$context = $context->replace("@", "�?");
		$attr = $this->GetAttrByKey($key);
		$attr->HelperUrl = (("javascript:alert('" . $context) . "')");
	}
	public function getIsAllowRepeatNo () 
	{
		return $this->_IsAllowRepeatNo;
	}
	public function setIsAllowRepeatNo ($value) // [boolean value]
	{
		$this->_IsAllowRepeatNo = $value;
	}
	public function SetToSimple () 
	{
		$attrs = Attrs::constructor__();
		foreach ($this->_attrs as $attr) 		{
			if (((($attr->getMyFieldType() == FieldType::$PK) || ($attr->getMyFieldType() == FieldType::$PKEnum)) || ($attr->getMyFieldType() == FieldType::$PKFK)))
			{
			/* match: Attr */
				$attrs->Add_Attr(Attr::constructor__String_String_Object_I_b_String($attr->getKey(), $attr->getField(), $attr->getDefaultVal(), $attr->getMyDataType(),  TRUE , $attr->getDesc()));
			}
			else
			{
			/* match: Attr */
				$attrs->Add_Attr(Attr::constructor__String_String_Object_I_b_String($attr->getKey(), $attr->getField(), $attr->getDefaultVal(), $attr->getMyDataType(),  FALSE , $attr->getDesc()));
			}
		}
		return $attrs;
	}
	public function getFK_MapData () 
	{
		if (($this->_FK_MapData . NULL))
		{
			return $this->getPhysicsTable();
		}
		return $this->_FK_MapData;
	}
	public function setFK_MapData ($value) // [String value]
	{
		$this->_FK_MapData = $value;
	}
	public function getFormShowType () 
	{
		return $this->_FormShowType;
	}
	public function setFormShowType ($value) // [FormShowType value]
	{
		$this->_FormShowType = $value;
	}
	public function getDepositaryOfEntity () 
	{
		return $this->_DepositaryOfEntity;
	}
	public function setDepositaryOfEntity ($value) // [Depositary value]
	{
		$this->_DepositaryOfEntity = $value;
	}
	public function Java_SetDepositaryOfMap ($val) // [Depositary val]
	{
		$this->setDepositaryOfMap($val);
	}
	public function Java_SetDepositaryOfEntity ($val) // [Depositary val]
	{
		$this->setDepositaryOfEntity($val);
	}
	public function getDepositaryOfMap () 
	{
		return $this->_DepositaryOfMap;
	}
	public function setDepositaryOfMap ($value) // [Depositary value]
	{
		$this->_DepositaryOfMap = $value;
	}
	public function getAttrsOfSearch () 
	{
		if (($this->_attrsOfSearch == NULL))
		{
			$this->_attrsOfSearch = AttrsOfSearch::constructor__();
		}
		return $this->_attrsOfSearch;
	}
	public function GetChoseAttrs_Entity ($en) // [Entity en]
	{
		return CField->GetMyAttrs($en->getGetNewEntities(), $en->getEnMap());
	}
	public function GetChoseAttrs_Entities ($ens) // [Entities ens]
	{
		return CField->GetMyAttrs($ens, $this);
	}
	public function getSearchAttrs () 
	{
		if (($this->_SearchAttrs == NULL))
		{
			$this->_SearchAttrs = AttrSearchs::constructor__();
		}
		return $this->_SearchAttrs;
	}
	public function AddHidden ($refKey, $symbol, $val) // [String refKey, String symbol, String val]
	{
		$aos = AttrOfSearch::constructor__String_String_String_String_String_I_b(("K" . $this->getAttrsOfSearch()->size()), $refKey, $refKey, $symbol, $val, 0,  TRUE );
			/* match: AttrOfSearch */
		$this->getAttrsOfSearch()->Add_AttrOfSearch($aos);
	}
	public function AddSearchAttr_String ($key) // [String key]
	{
			/* match: String_I */
		$this->AddSearchAttr_String_I($key, 130);
	}
	public function AddSearchAttr_String_I ($key, $width) // [String key, int width]
	{
		$attr = $this->GetAttrByKey($key);
		if ($attr->getKey()->equals("FK_Dept"))
		{
			/* match: Attr_b_String_I */
			$this->getSearchAttrs()->Add_Attr_b_String_I($attr,  FALSE , NULL, $width);
		}
		else
		{
			/* match: Attr_b_String_I */
			$this->getSearchAttrs()->Add_Attr_b_String_I($attr,  TRUE , NULL, $width);
		}
	}
	public function AddSearchAttr_String_b_String ($key, $isShowSelectedAll, $relationalDtlKey) // [String key, boolean isShowSelectedAll, String relationalDtlKey]
	{
		$attr = $this->GetAttrByKey($key);
			/* match: Attr_b_String */
		$this->getSearchAttrs()->Add_Attr_b_String($attr, $isShowSelectedAll, $relationalDtlKey);
	}
	public function GetFieldByKey ($key) // [String key]
	{
		return $this->GetAttrByKey($key)->getField();
	}
	public function GetDescByKey ($key) // [String key]
	{
		return $this->GetAttrByKey($key)->getDesc();
	}
	public function GetAttrByKey ($key) // [String key]
	{
		foreach ($this->getAttrs() as $attr) 		{
			if ($attr->getKey()->toUpperCase()->equals($key->toUpperCase()))
			{
				return $attr;
			}
		}
		if (($key . NULL))
		{
			throw new \RuntimeException((("@[" . $this->getEnDesc()) . "] 获取属�?�key 值不能为�?."));
		}
		if ($this->contains("."))
		{
			throw new \RuntimeException((((((("@[" . $this->getEnDesc()) . ",") . $this->getPhysicsTable()) . "] 没有找到 key=[") . $key) . "]的属性，请检查Map文件。此问题出错的原因之�?是，在设置系统中的一个实体的属�?�关联这个实体，你在给实体设置信息时没有按照规则书写reftext, refvalue。请核实�?"));
		}
		else
		{
			throw new \RuntimeException((((((((((("@[" . $this->getEnDesc()) . ",") . $this->getPhysicsTable()) . "] 没有找到 key=[") . $key) . "]的属性，请检查Sys_MapAttr表是否有该数�?,用SQL执行: SELECT * FROM Sys_MapAttr WHERE FK_MapData='") . $this) . "' AND KeyOfEn='") . $key) . "' 是否可以查询到数据，如果没有可能该字段属性丢失�??"));
		}
	}
	public function GetAttrByBindKey ($key) // [String key]
	{
		foreach ($this->getAttrs() as $attr) 		{
			if ($attr->getUIBindKey()->equals($key))
			{
				return $attr;
			}
		}
		if (($key . NULL))
		{
			throw new \RuntimeException((("@[" . $this->getEnDesc()) . "] 获取属�?�key 值不能为�?."));
		}
		if ($this->contains("."))
		{
			throw new \RuntimeException((((((("@[" . $this->getEnDesc()) . ",") . $this) . "] 没有找到 key=[") . $key) . "]的属性，请检查Map文件。此问题出错的原因之�?是，在设置系统中的一个实体的属�?�关联这个实体，你在给实体设置信息时没有按照规则书写reftext, refvalue。请核实�?"));
		}
		else
		{
			throw new \RuntimeException((((((((((("@[" . $this->getEnDesc()) . ",") . $this) . "] 没有找到 key=[") . $key) . "]的属性，请检查Sys_MapAttr表是否有该数�?,用SQL执行: SELECT * FROM Sys_MapAttr WHERE FK_MapData='") . $this) . "' AND KeyOfEn='") . $key) . "' 是否可以查询到数据，如果没有可能该字段属性丢失�??"));
		}
	}
	public function GetAttrByDesc ($desc) // [String desc]
	{
		foreach ($this->getAttrs() as $attr) 		{
			if ($attr->getDesc()->equals($desc))
			{
				return $attr;
			}
		}
		if (($desc . NULL))
		{
			throw new \RuntimeException((("@[" . $this->getEnDesc()) . "] 获取属�?? desc  值不能为�?."));
		}
		throw new \RuntimeException((((("@[" . $this->getEnDesc()) . "] 没有找到 desc=[") . $desc) . "]的属性，请检查Map文件。此问题出错的原因之�?是，在设置系统中的一个实体的属�?�关联这个实体，你在给实体设置信息时没有按照规则书写reftext, refvalue。请核实�?"));
	}
	public function getMaxTBLength () 
	{
		if (($this->_MaxTBLength == 0))
		{
			foreach ($this->getAttrs() as $attr) 			{
				if (($attr->getUIWidth() > $this->_MaxTBLength))
				{
					$this->_MaxTBLength = $attr->getUIWidth();
				}
			}
		}
		return $this->_MaxTBLength;
	}
	public function getHisPhysicsAttrs () 
	{
		if (($this->_HisPhysicsAttrs == NULL))
		{
			$this->_HisPhysicsAttrs = Attrs::constructor__();
			foreach ($this->getAttrs() as $attr) 			{
				if ((($attr->getMyFieldType() == FieldType::$NormalVirtual) || ($attr->getMyFieldType() == FieldType::$RefText)))
				{
					continue;
				}
			/* match: Attr_b_b */
				$this->_HisPhysicsAttrs->Add_Attr_b_b($attr,  FALSE , $this->IsAddRefName);
			}
		}
		return $this->_HisPhysicsAttrs;
	}
	public function getHisFKAttrs () 
	{
		if (($this->_HisFKAttrs == NULL))
		{
			$this->_HisFKAttrs = Attrs::constructor__();
			foreach ($this->getAttrs() as $attr) 			{
				if ((($attr->getMyFieldType() == FieldType::$FK) || ($attr->getMyFieldType() == FieldType::$PKFK)))
				{
			/* match: Attr_b_b */
					$this->_HisFKAttrs->Add_Attr_b_b($attr,  FALSE ,  FALSE );
				}
			}
		}
		return $this->_HisFKAttrs;
	}
	public function getIsHaveAutoFull () 
	{
		if (($this->_isFull == -1))
		{
			foreach ($this->_attrs as $attr) 			{
				if (($attr->AutoFullDoc != NULL))
				{
					$this->_isFull = 1;
				}
			}
			if (($this->_isFull == -1))
			{
				$this->_isFull = 0;
			}
		}
		if (($this->_isFull == 0))
		{
			return  FALSE ;
		}
		return  TRUE ;
	}
	public function getIsHaveJS () 
	{
		if (($this->_isJs == -1))
		{
			foreach ($this->_attrs as $attr) 			{
				if (($attr->AutoFullDoc == NULL))
				{
					continue;
				}
				if (($attr->AutoFullWay == AutoFullWay::$Way1_JS))
				{
					$this->_isJs = 1;
					break;
				}
			}
			if (($this->_isJs == -1))
			{
				$this->_isJs = 0;
			}
		}
		if (($this->_isJs == 0))
		{
			return  FALSE ;
		}
		return  TRUE ;
	}
	public function getHisEnumAttrs () 
	{
		if (($this->_HisEnumAttrs == NULL))
		{
			$this->_HisEnumAttrs = Attrs::constructor__();
			foreach ($this->getAttrs() as $attr) 			{
				if ((($attr->getMyFieldType() == FieldType::$Enum) || ($attr->getMyFieldType() == FieldType::$PKEnum)))
				{
			/* match: Attr_b_b */
					$this->_HisEnumAttrs->Add_Attr_b_b($attr,  TRUE ,  FALSE );
				}
			}
		}
		return $this->_HisEnumAttrs;
	}
	public function getHisFKEnumAttrs () 
	{
		if (($this->_HisFKEnumAttrs == NULL))
		{
			$this->_HisFKEnumAttrs = Attrs::constructor__();
			foreach ($this->getAttrs() as $attr) 			{
				if ((((($attr->getMyFieldType() == FieldType::$Enum) || ($attr->getMyFieldType() == FieldType::$PKEnum)) || ($attr->getMyFieldType() == FieldType::$FK)) || ($attr->getMyFieldType() == FieldType::$PKFK)))
				{
			/* match: Attr */
					$this->_HisFKEnumAttrs->Add_Attr($attr);
				}
			}
		}
		return $this->_HisFKEnumAttrs;
	}
	public function getHisCfgAttrs () 
	{
		if (($this->_HisCfgAttrs == NULL))
		{
			$this->_HisCfgAttrs = Attrs::constructor__();
			if ($BP->Web->WebUser->getNo()->equals("admin"))
			{
				$this->_HisCfgAttrs->AddDDLSysEnum("UIRowStyleGlo", 2, "表格数据行风�?(应用全局)",  TRUE ,  FALSE , "UIRowStyleGlo", "@0=无风格@1=交替风格@2=鼠标移动@3=交替并鼠标移�?");
				$this->_HisCfgAttrs->AddBoolen("IsEnableDouclickGlo",  TRUE , "是否启动双击打开(应用全局)");
				$this->_HisCfgAttrs->AddBoolen("IsEnableFocusField",  TRUE , "是否启用焦点字段");
				$this->_HisCfgAttrs->AddTBString("FocusField", NULL, "焦点字段(用于显示点击打开的列",  TRUE ,  FALSE , 0, 20, 20);
				$this->_HisCfgAttrs->AddBoolen("IsEnableRefFunc",  TRUE , "是否启用相关功能�?");
				$this->_HisCfgAttrs->AddBoolen("IsEnableOpenICON",  TRUE , "是否启用打开图标");
				$this->_HisCfgAttrs->AddDDLSysEnum("MoveToShowWay", 0, "移动到显示方�?",  TRUE ,  FALSE , "MoveToShowWay", "@0=不显示@1=下拉列表@2=平铺");
				$this->_HisCfgAttrs->AddTBString("MoveTo", NULL, "移动到字�?",  TRUE ,  FALSE , 0, 20, 20);
				$this->_HisCfgAttrs->AddTBInt("WinCardW", 820, "弹出窗口宽度",  TRUE ,  FALSE );
				$this->_HisCfgAttrs->AddTBInt("WinCardH", 480, "弹出窗口高度",  TRUE ,  FALSE );
				$this->_HisCfgAttrs->AddDDLSysEnum("EditerType", 0, "大块文本编辑�?",  TRUE ,  FALSE , "EditerType", "@0=无@1=sina编辑器@2=FKCEditer@3=KindEditor@4=UEditor");
				$this->_HisCfgAttrs->AddTBString("ShowColumns", "", "选择�?",  FALSE ,  FALSE , 0, 1000, 100);
			}
		}
		return $this->_HisCfgAttrs;
	}
	public function getHisRefAttrs () 
	{
		if (($this->_HisRefAttrs == NULL))
		{
			$this->_HisRefAttrs = Attrs::constructor__();
			foreach ($this->getAttrs() as $attr) 			{
				if ((($attr->getMyFieldType() == FieldType::$FK) || ($attr->getMyFieldType() == FieldType::$PKFK)))
				{
			/* match: Attr */
					$this->_HisRefAttrs->Add_Attr($attr);
				}
			}
		}
		return $this->_HisRefAttrs;
	}
	public function AddRefMethod_String_String_Attrs_String_String_String_String_I_I ($title, $classMethodName, $attrs, $warning, $icon, $tooltip, $target, $width, $height) // [String title, String classMethodName, Attrs attrs, String warning, String icon, String tooltip, String target, int width, int height]
	{
		$func = RefMethod::constructor__();
		$func->Title = $title;
		$func->Warning = $warning;
		$func->ClassMethodName = $classMethodName;
		$func->Icon = $icon;
		$func->ToolTip = $tooltip;
		$func->Width = $width;
		$func->Height = $height;
		$func->setHisAttrs($attrs);
		$this->getHisRefMethods()->Add($func);
	}
	public function AddRefMethodOpen () 
	{
		$func = RefMethod::constructor__();
		$func->Title = "打开";
		$func->ClassMethodName = ($this . ".DoOpenCard");
		$func->Icon = ($SystemConfig->getCCFlowWebPath() . "WF/Img/Btn/Edit.gif");
		$this->getHisRefMethods()->Add($func);
	}
	public function AddRefMethod_RefMethod ($rm) // [RefMethod rm]
	{
		$this->getHisRefMethods()->Add($rm);
	}
	public function AddDtl_Entities_String ($ens, $refKey) // [Entities ens, String refKey]
	{
			/* match: Entities_String_String */
		$this->AddDtl_Entities_String_String($ens, $refKey, NULL);
	}
	public function AddDtl_Entities_String_String ($ens, $refKey, $groupName) // [Entities ens, String refKey, String groupName]
	{
		$dtl = EnDtl::constructor__();
		$dtl->setEns($ens);
		$dtl->setRefKey($refKey);
		$dtl->setGroupName($groupName);
		$this->getDtls()->Add($dtl);
	}
	public function getHisRefMethods () 
	{
		if (($this->_RefMethods == NULL))
		{
			$this->_RefMethods = new RefMethods();
		}
		return $this->_RefMethods;
	}
	public function getDtls () 
	{
		if (($this->_Dtls == NULL))
		{
			$this->_Dtls = new EnDtls();
		}
		return $this->_Dtls;
	}
	public function getDtlsAll () 
	{
		if (($this->_DtlsAll == NULL))
		{
			$this->_DtlsAll = $this->getDtls();
			foreach ($this->getAttrsOfOneVSM() as $en) 			{
				$dtl = EnDtl::constructor__();
				$dtl->setEns($en->getEnsOfMM());
				$dtl->setRefKey($en->getAttrOfOneInMM());
				$this->_DtlsAll->Add($dtl);
			}
		}
		return $this->_DtlsAll;
	}
	public static function constructor__DBUrl_String ($dburl, $physicsTable) // [DBUrl dburl, String physicsTable]
	{
		$me = new self();
		$me->__init();
		$me->setEnDBUrl($dburl);
		$me->setPhysicsTable($physicsTable);
		return $me;
	}
	public static function constructor__String ($physicsTable) // [String physicsTable]
	{
		$me = new self();
		$me->__init();
		$me->setPhysicsTable($physicsTable);
		return $me;
	}
	public static function constructor__String_String ($physicsTable, $enDesc) // [String physicsTable, String enDesc]
	{
		$me = new self();
		$me->__init();
		$me->setPhysicsTable($physicsTable);
		$me->_EnDesc = $enDesc;
		return $me;
	}
	public static function constructor__DBUrlType_String ($dburltype, $physicsTable) // [DBUrlType dburltype, String physicsTable]
	{
		$me = new self();
		$me->__init();
		$me->setEnDBUrl(new DBUrl($dburltype));
		$me->setPhysicsTable($physicsTable);
		return $me;
	}
	public static function constructor__ () 
	{
		$me = new self();
		$me->__init();
		return $me;
	}
	public function getAttrsOfOneVSM () 
	{
		if (($this->_AttrsOfOneVSM == NULL))
		{
			$this->_AttrsOfOneVSM = AttrsOfOneVSM::constructor__();
		}
		return $this->_AttrsOfOneVSM;
	}
	public function setAttrsOfOneVSM ($value) // [AttrsOfOneVSM value]
	{
		$this->_AttrsOfOneVSM = $value;
	}
	public function GetAttrOfOneVSM ($ensOfMMclassName) // [String ensOfMMclassName]
	{
		foreach ($this->getAttrsOfOneVSM() as $attr) 		{
			if ($attr->getEnsOfMM()->equals($ensOfMMclassName))
			{
				return $attr;
			}
		}
		throw new \RuntimeException(("error param:  " . $ensOfMMclassName));
	}
	public function getAdjunctType () 
	{
		return $this->_AdjunctType;
	}
	public function setAdjunctType ($value) // [AdjunctType value]
	{
		$this->_AdjunctType = $value;
	}
	public function getEnDesc () 
	{
		return $this->_EnDesc;
	}
	public function setEnDesc ($value) // [String value]
	{
		$this->_EnDesc = $value;
	}
	public function getEnType () 
	{
		return $this->_EnType;
	}
	public function setEnType ($value) // [EnType value]
	{
		$this->_EnType = $value;
	}
	public function Java_SetEnType ($val) // [EnType val]
	{
		$this->_EnType = $val;
	}
	public function GenerMap ($xml) // [String xml]
	{
		$ds = new DataSet("");
		$ds->readXml($xml);
		foreach ($ds->Tables as $dt) 		{
			switch ($dt->TableName) {
				case "Base":
					$this->DealDT_Base($dt);
					break;
				case "Attr":
					$this->DealDT_Attr($dt);
					break;
				case "SearchAttr":
					$this->DealDT_SearchAttr($dt);
					break;
				case "Dtl":
					$this->DealDT_SearchAttr($dt);
					break;
				case "Dot2Dot":
					$this->DealDT_Dot2Dot($dt);
					break;
				default:
					throw new \RuntimeException(("XML 配置信息错误，没有约定的标记:" . $dt->TableName));
			}
		}
	}
	protected function DealDT_Base ($dt) // [DataTable dt]
	{
		if (($dt->Rows->size() != 1))
		{
			throw new \RuntimeException("基础信息配置错误，不能多于或者少�?1行记录�??");
		}
		foreach ($dt->Columns as $dc) 		{
			$val = $dt->Rows->get(0)->getValue($dc->ColumnName);
			if (($val . NULL))
			{
				continue;
			}
			if (($dt->Rows->get(0)->getValue($dc->ColumnName) == NULL))
			{
				continue;
			}
			switch ($dc->ColumnName) {
				case "EnDesc":
					$this->setEnDesc($val);
					break;
				case "Table":
					$this->setPhysicsTable($val);
					break;
				case "DBUrl":
					$this->setEnDBUrl(new DBUrl($DataType->GetDBUrlByString($val)));
					break;
				case "ICON":
					$this->Icon = $val;
					break;
				case "CodeStruct":
					$this->setCodeStruct($val);
					break;
				case "AdjunctType":
					break;
				case "EnType":
					switch ($val) {
						case "Admin":
							$this->setEnType($BP->En->EnType->Admin);
							break;
						case "App":
							$this->setEnType($BP->En->EnType->App);
							break;
						case "Dot2Dot":
							$this->setEnType($BP->En->EnType->Dot2Dot);
							break;
						case "Dtl":
							$this->setEnType($BP->En->EnType->Dtl);
							break;
						case "Etc":
							$this->setEnType($BP->En->EnType->Etc);
							break;
						case "PowerAble":
							$this->setEnType($BP->En->EnType->PowerAble);
							break;
						case "Sys":
							$this->setEnType($BP->En->EnType->Sys);
							break;
						case "View":
							$this->setEnType($BP->En->EnType->View);
							break;
						case "XML":
							$this->setEnType($BP->En->EnType->XML);
							break;
						default:
							throw new \RuntimeException(("没有约定的标�?:EnType =  " . $val));
					}
					break;
				case "DepositaryOfEntity":
					switch ($val) {
						case "Application":
							$this->setDepositaryOfEntity($Depositary->Application);
							break;
						case "None":
							$this->setDepositaryOfEntity($Depositary->None);
							break;
						case "Session":
							$this->setDepositaryOfEntity($Depositary->Application);
							break;
						default:
							throw new \RuntimeException((("没有约定的标�?:DepositaryOfEntity=[" . $val) . "] 应该选择�?,Application, None, Session "));
					}
					break;
				case "DepositaryOfMap":
					switch ($val) {
						case "Application":
						case "Session":
							$this->setDepositaryOfMap($Depositary->Application);
							break;
						case "None":
							$this->setDepositaryOfMap($Depositary->None);
							break;
						default:
							throw new \RuntimeException((("没有约定的标�?:DepositaryOfMap=[" . $val) . "] 应该选择�?,Application, None, Session "));
					}
					break;
				case "PKs":
					$this->PKs = $val;
					break;
				default:
					throw new \RuntimeException(("基础信息中没有约定的标记:" . $val));
			}
		}
	}
	protected function DealDT_Attr ($dt) // [DataTable dt]
	{
		foreach ($dt->Rows as $dr) 		{
			$attr = Attr::constructor__();
			foreach ($dt->Columns as $dc) 			{
				$val = $dr->get($dc->ColumnName);
				switch ($dc->ColumnName) {
					case "Key":
						$attr->setKey($val);
						break;
					case "Field":
						$attr->setField($val);
						break;
					case "DefVal":
						$attr->setDefaultVal($val);
						break;
					case "DT":
						$attr->setMyDataType($DataType->GetDataTypeByString($val));
						break;
					case "UIBindKey":
						$attr->setUIBindKey($val);
						break;
					case "UIIsReadonly":
						if (($val->equals("1") || $val->toUpperCase()->equals("TRUE")))
						{
							$attr->setUIIsReadonly( TRUE );
						}
						else
						{
							$attr->setUIIsReadonly( FALSE );
						}
						break;
					case "MinLen":
						$attr->setMinLength($Integer->parseInt($val));
						break;
					case "MaxLen":
						$attr->setMaxLength($Integer->parseInt($val));
						break;
					case "TBLen":
						$attr->setUIWidth($Integer->parseInt($val));
						break;
					default:
						throw new \RuntimeException(("没有约定的标�?:" . $val));
				}
			}
			if (($attr->getUIBindKey() . NULL))
			else
			{
				if (($attr->getUIBindKey()->indexOf(".") != -1))
				{
					$ens = $attr->getHisFKEns();
					$ensNoName = ( ($ens instanceof EntitiesNoName) ? $ens : NULL );
					if (($ensNoName == NULL))
					else
					{
						if (($this->PKs->indexOf($attr->getKey()) != -1))
						{
							if ($attr->getField()->equals(""))
							{
								$attr->setField($attr->getKey());
							}
							$this->AddDDLEntitiesPK_String_String_String_String_EntitiesNoName_b($attr->getKey(), $attr->getField(), $attr->getDefaultVal(), $attr->getDesc(), $ensNoName, $attr->getUIIsReadonly());
						}
						else
						{
							$this->AddDDLEntities_String_String_String_String_EntitiesNoName_b($attr->getKey(), $attr->getField(), $attr->getDefaultVal(), $attr->getDesc(), $ensNoName, $attr->getUIIsReadonly());
						}
					}
				}
				else
			}
		}
	}
	abstract function DealDT_SearchAttr ($dt); // [DataTable dt]
	abstract function DealDT_Dtl ($dt); // [DataTable dt]
	abstract function DealDT_Dot2Dot ($dt); // [DataTable dt]
	public function getGenerNoLength () 
	{
		if (($this->_GenerNoLength == 0))
		{
			throw new \RuntimeException("@没有指定生成字串的字段长度�??");
		}
		return $this->_GenerNoLength;
	}
	public function setGenerNoLength ($value) // [int value]
	{
		$this->_GenerNoLength = $value;
	}
	public function getCodeStruct () 
	{
		return $this->_CodeStruct;
	}
	public function setCodeStruct ($value) // [String value]
	{
		$this->_CodeStruct = $value;
		$this->setIsAutoGenerNo( TRUE );
	}
	public function Java_SetCodeStruct ($val) // [String val]
	{
		$this->setCodeStruct($val);
	}
	public function getCodeLength () 
	{
		$i = 0;
		if (($this->getCodeStruct()->length() == 0))
		{
			$i = $Integer->parseInt($this->getCodeStruct());
		}
		else
		{
			$s = $this->getCodeStruct()->toCharArray();
			foreach ($s as $c) 			{
				$i = ($i + $Integer->parseInt($String->valueOf($c)));
			}
		}
		return $i;
	}
	public function getIsAllowRepeatName () 
	{
		return $this->_IsAllowRepeatName;
	}
	public function setIsAllowRepeatName ($value) // [boolean value]
	{
		$this->_IsAllowRepeatName = $value;
	}
	public function getIsAutoGenerNo () 
	{
		return $this->_IsAutoGenerNo;
	}
	public function setIsAutoGenerNo ($value) // [boolean value]
	{
		$this->_IsAutoGenerNo = $value;
	}
	public function getIsCheckNoLength () 
	{
		return $this->_IsCheckNoLength;
	}
	public function setIsCheckNoLength ($value) // [boolean value]
	{
		$this->_IsCheckNoLength = $value;
	}
	public function getEnDBUrl () 
	{
		if (($this->_EnDBUrl == NULL))
		{
			$this->_EnDBUrl = new DBUrl();
		}
		return $this->_EnDBUrl;
	}
	public function setEnDBUrl ($value) // [DBUrl value]
	{
		$this->_EnDBUrl = $value;
	}
	public function getIsView () 
	{
		return DBAccess->IsView($this->getPhysicsTableExt(), $this->getEnDBUrl()->getDBType());
	}
	public function getPhysicsTableExt () 
	{
		if (($this->getPhysicsTable()->indexOf(".") != -1))
		{
			$str = $this->getPhysicsTable()->split("[.]", -1);
			return $str[1];
		}
		else
		{
			return $this->getPhysicsTable();
		}
	}
	public function getPhysicsTable () 
	{
		return $this->_PhysicsTable;
	}
	public function setPhysicsTable ($value) // [String value]
	{
		Cash->RemoveObj(($this . "SQL"), $Depositary->Application);
		$Cash->RemoveObj(("MapOf" . $this), $this->getDepositaryOfMap());
		$this->_PhysicsTable = $value;
	}
	public function getAttrs () 
	{
		if (($this->_attrs == NULL))
		{
			$this->_attrs = Attrs::constructor__();
		}
		return $this->_attrs;
	}
	public function setAttrs ($value) // [Attrs value]
	{
		if (($this->_attrs == NULL))
		{
			$this->_attrs = Attrs::constructor__();
		}
		$myattrs = $value;
		foreach ($myattrs as $item) 		{
			$this->_attrs->Add($item);
		}
	}
	protected function AddDDLFixEnum_String_String_I_b_String_DDLShowType_b ($key, $field, $defaultVal, $IsPK, $desc, $showtype, $isReadonly) // [String key, String field, int defaultVal, boolean IsPK, String desc, DDLShowType showtype, boolean isReadonly]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppInt);
		if ($IsPK)
		{
			$attr->setMyFieldType(FieldType::$PK);
		}
		else
		{
			$attr->setMyFieldType(FieldType::$Normal);
		}
		$attr->setDesc($desc);
		$attr->setUIContralType(UIContralType::$DDL);
		$attr->setUIDDLShowType($showtype);
		$attr->setUIIsReadonly($isReadonly);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	protected function AddDDLFixEnumPK_String_I_String_DDLShowType_b ($key, $defaultVal, $desc, $showtype, $isReadonly) // [String key, int defaultVal, String desc, DDLShowType showtype, boolean isReadonly]
	{
			/* match: String_String_I_b_String_DDLShowType_b */
		$this->AddDDLFixEnum_String_String_I_b_String_DDLShowType_b($key, $key, $defaultVal,  TRUE , $desc, $showtype, $isReadonly);
	}
	protected function AddDDLFixEnumPK_String_String_I_String_DDLShowType_b ($key, $field, $defaultVal, $desc, $showtype, $isReadonly) // [String key, String field, int defaultVal, String desc, DDLShowType showtype, boolean isReadonly]
	{
			/* match: String_String_I_String_DDLShowType_b */
		$this->AddDDLFixEnumPK_String_String_I_String_DDLShowType_b($key, $field, $defaultVal, $desc, $showtype, $isReadonly);
	}
	protected function AddDDLFixEnum_String_I_String_DDLShowType_b ($key, $defaultVal, $desc, $showtype, $isReadonly) // [String key, int defaultVal, String desc, DDLShowType showtype, boolean isReadonly]
	{
			/* match: String_String_I_b_String_DDLShowType_b */
		$this->AddDDLFixEnum_String_String_I_b_String_DDLShowType_b($key, $key, $defaultVal,  FALSE , $desc, $showtype, $isReadonly);
	}
	public function AddBoolean_String_b_String_b_b_b_String ($key, $defaultVal, $desc, $isUIVisable, $isUIEnable, $isLine, $helpUrl) // [String key, boolean defaultVal, String desc, boolean isUIVisable, boolean isUIEnable, boolean isLine, String helpUrl]
	{
			/* match: String_String_b_String_b_b_b_String */
		$this->AddBoolean_String_String_b_String_b_b_b_String($key, $key, $defaultVal, $desc, $isUIVisable, $isUIEnable, $isLine, NULL);
	}
	public function AddBoolean_String_String_b_String_b_b_b ($key, $field, $defaultVal, $desc, $isUIVisable, $isUIEnable, $isLine) // [String key, String field, boolean defaultVal, String desc, boolean isUIVisable, boolean isUIEnable, boolean isLine]
	{
			/* match: String_String_b_String_b_b_b_String */
		$this->AddBoolean_String_String_b_String_b_b_b_String($key, $field, $defaultVal, $desc, $isUIVisable, $isUIEnable, $isLine, NULL);
	}
	public function AddBoolean_String_String_b_String_b_b_b_String ($key, $field, $defaultVal, $desc, $isUIVisable, $isUIEnable, $isLine, $helpUrl) // [String key, String field, boolean defaultVal, String desc, boolean isUIVisable, boolean isUIEnable, boolean isLine, String helpUrl]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($field);
		$attr->HelperUrl = $helpUrl;
		if ($defaultVal)
		{
			$attr->setDefaultVal(1);
		}
		else
		{
			$attr->setDefaultVal(0);
		}
		$attr->setMyDataType($DataType->AppBoolean);
		$attr->setDesc($desc);
		$attr->setUIContralType(UIContralType::$CheckBok);
		$attr->setUIIsReadonly($isUIEnable);
		$attr->setUIVisible($isUIVisable);
		$attr->UIIsLine = $isLine;
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddBoolean_String_b_String_b_b ($key, $defaultVal, $desc, $isUIVisable, $isUIEnable) // [String key, boolean defaultVal, String desc, boolean isUIVisable, boolean isUIEnable]
	{
		$this->AddBoolean_String_String_b_String_b_b_b($key, $key, $defaultVal, $desc, $isUIVisable, $isUIEnable,  FALSE );
	}
	public function AddBoolean_String_b_String_b_b_b ($key, $defaultVal, $desc, $isUIVisable, $isUIEnable, $isLine) // [String key, boolean defaultVal, String desc, boolean isUIVisable, boolean isUIEnable, boolean isLine]
	{
		$this->AddBoolean_String_String_b_String_b_b_b($key, $key, $defaultVal, $desc, $isUIVisable, $isUIEnable, $isLine);
	}
	public function AddDDLSysEnumPK ($key, $field, $defaultVal, $desc, $isUIVisable, $isUIEnable, $sysEnumKey) // [String key, String field, int defaultVal, String desc, boolean isUIVisable, boolean isUIEnable, String sysEnumKey]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppInt);
		$attr->setMyFieldType(FieldType::$PKEnum);
		$attr->setDesc($desc);
		$attr->setUIContralType(UIContralType::$DDL);
		$attr->setUIDDLShowType(DDLShowType::$SysEnum);
		$attr->setUIBindKey($sysEnumKey);
		$attr->setUIVisible($isUIVisable);
		$attr->setUIIsReadonly(!$isUIEnable);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddDDLSysEnum_String_String_I_String_b_b_String_String_b ($key, $field, $defaultVal, $desc, $isUIVisable, $isUIEnable, $sysEnumKey, $cfgVal, $isLine) // [String key, String field, int defaultVal, String desc, boolean isUIVisable, boolean isUIEnable, String sysEnumKey, String cfgVal, boolean isLine]
	{
			/* match: String_String_I_String_b_b_String_String_b_String */
		$this->AddDDLSysEnum_String_String_I_String_b_b_String_String_b_String($key, $field, $defaultVal, $desc, $isUIVisable, $isUIEnable, $sysEnumKey, $cfgVal, $isLine, NULL);
	}
	public function AddDDLSysEnum_String_String_I_String_b_b_String_String_b_String ($key, $field, $defaultVal, $desc, $isUIVisable, $isUIEnable, $sysEnumKey, $cfgVal, $isLine, $helpUrl) // [String key, String field, int defaultVal, String desc, boolean isUIVisable, boolean isUIEnable, String sysEnumKey, String cfgVal, boolean isLine, String helpUrl]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->HelperUrl = $helpUrl;
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppInt);
		$attr->setMyFieldType(FieldType::$Enum);
		$attr->setDesc($desc);
		$attr->setUIContralType(UIContralType::$DDL);
		$attr->setUIDDLShowType(DDLShowType::$SysEnum);
		$attr->setUIBindKey($sysEnumKey);
		$attr->UITag = $cfgVal;
		$attr->setUIVisible($isUIVisable);
		$attr->setUIIsReadonly($isUIEnable);
		$attr->UIIsLine = $isLine;
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddDDLSysEnum_String_I_String_b_b_String ($key, $defaultVal, $desc, $isUIVisable, $isUIEnable, $sysEnumKey) // [String key, int defaultVal, String desc, boolean isUIVisable, boolean isUIEnable, String sysEnumKey]
	{
			/* match: String_String_I_String_b_b_String_String_b */
		$this->AddDDLSysEnum_String_String_I_String_b_b_String_String_b($key, $key, $defaultVal, $desc, $isUIVisable, $isUIEnable, $sysEnumKey, NULL,  FALSE );
	}
	public function AddDDLSysEnum_String_I_String_b_b_String_String_b ($key, $defaultVal, $desc, $isUIVisable, $isUIEnable, $sysEnumKey, $cfgVal, $isLine) // [String key, int defaultVal, String desc, boolean isUIVisable, boolean isUIEnable, String sysEnumKey, String cfgVal, boolean isLine]
	{
			/* match: String_String_I_String_b_b_String_String_b */
		$this->AddDDLSysEnum_String_String_I_String_b_b_String_String_b($key, $key, $defaultVal, $desc, $isUIVisable, $isUIEnable, $sysEnumKey, $cfgVal, $isLine);
	}
	public function AddDDLSysEnum_String_I_String_b_b_String_String ($key, $defaultVal, $desc, $isUIVisable, $isUIEnable, $sysEnumKey, $cfgVal) // [String key, int defaultVal, String desc, boolean isUIVisable, boolean isUIEnable, String sysEnumKey, String cfgVal]
	{
			/* match: String_String_I_String_b_b_String_String_b */
		$this->AddDDLSysEnum_String_String_I_String_b_b_String_String_b($key, $key, $defaultVal, $desc, $isUIVisable, $isUIEnable, $sysEnumKey, $cfgVal,  FALSE );
	}
	public function AddDDLSysEnum_String_I_String_b_b ($key, $defaultVal, $desc, $isUIVisable, $isUIEnable) // [String key, int defaultVal, String desc, boolean isUIVisable, boolean isUIEnable]
	{
			/* match: String_String_I_String_b_b_String_String_b */
		$this->AddDDLSysEnum_String_String_I_String_b_b_String_String_b($key, $key, $defaultVal, $desc, $isUIVisable, $isUIEnable, $key, NULL,  FALSE );
	}
	public function AddRadioBtnSysEnum_String_String_I_String_b_b_String ($key, $field, $defaultVal, $desc, $isUIVisable, $isUIEnable, $sysEnumKey) // [String key, String field, int defaultVal, String desc, boolean isUIVisable, boolean isUIEnable, String sysEnumKey]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppInt);
		$attr->setMyFieldType(FieldType::$Enum);
		$attr->setDesc($desc);
		$attr->setUIContralType(UIContralType::$RadioBtn);
		$attr->setUIDDLShowType(DDLShowType::$Self);
		$attr->setUIBindKey($sysEnumKey);
		$attr->setUIVisible($isUIVisable);
		$attr->setUIIsReadonly(!$isUIEnable);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddRadioBtnSysEnum_String_I_String_b_b_String ($key, $defaultVal, $desc, $isUIVisable, $isUIEnable, $sysEnumKey) // [String key, int defaultVal, String desc, boolean isUIVisable, boolean isUIEnable, String sysEnumKey]
	{
			/* match: String_String_I_String_b_b_String_String_b */
		$this->AddDDLSysEnum_String_String_I_String_b_b_String_String_b($key, $key, $defaultVal, $desc, $isUIVisable, $isUIEnable, $sysEnumKey, NULL,  FALSE );
	}
	public function AddDDLSQL_String_Object_String_String ($key, $defaultVal, $desc, $sql) // [String key, Object defaultVal, String desc, String sql]
	{
			/* match: String_Object_String_String_b */
		$this->AddDDLSQL_String_Object_String_String_b($key, $defaultVal, $desc, $sql,  TRUE );
	}
	public function AddDDLSQL_String_Object_String_String_b ($key, $defaultVal, $desc, $sql, $uiIsEnable) // [String key, Object defaultVal, String desc, String sql, boolean uiIsEnable]
	{
		if (($defaultVal == NULL))
		{
			$defaultVal = "";
		}
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($key);
		if ((Integer == $defaultVal->getClass()))
		{
			$attr->setDefaultVal($defaultVal);
			$attr->setMyDataType($DataType->AppInt);
		}
		else
		{
			$attr->setDefaultVal($defaultVal);
			$attr->setMyDataType($DataType->AppString);
		}
		$attr->setMyFieldType(FieldType::$Normal);
		$attr->setMaxLength(50);
		$attr->setDesc($desc);
		$attr->setUIContralType(UIContralType::$DDL);
		$attr->setUIDDLShowType(DDLShowType::$BindSQL);
		$attr->setUIBindKey($sql);
		$attr->setHisFKEns(NULL);
		$attr->setUIIsReadonly(!$uiIsEnable);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
		$attr = Attr::constructor__();
		$attr->setKey(($key . "Text"));
		$attr->setField(($key . "Text"));
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppString);
		$attr->setMyFieldType(FieldType::$Normal);
		$attr->setMaxLength(200);
		$attr->setDesc($desc);
		$attr->setUIContralType(UIContralType::$TB);
		$attr->setUIIsReadonly( TRUE );
		$attr->setUIVisible( FALSE );
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddDDLEntities_String_String_String_EntitiesTree_b ($key, $defaultVal, $desc, $ens, $uiIsEnable) // [String key, String defaultVal, String desc, EntitiesTree ens, boolean uiIsEnable]
	{
			/* match: String_String_Object_I_String_Entities_String_String_b */
		$this->AddDDLEntities_String_String_Object_I_String_Entities_String_String_b($key, $key, $defaultVal, $DataType->AppString, $desc, $ens, "No", "Name", $uiIsEnable);
	}
	public function AddDDLEntities_String_String_String_EntitiesNoName_b ($key, $defaultVal, $desc, $ens, $uiIsEnable) // [String key, String defaultVal, String desc, EntitiesNoName ens, boolean uiIsEnable]
	{
			/* match: String_String_Object_I_String_Entities_String_String_b */
		$this->AddDDLEntities_String_String_Object_I_String_Entities_String_String_b($key, $key, $defaultVal, $DataType->AppString, $desc, $ens, "No", "Name", $uiIsEnable);
	}
	public function AddDDLEntities_String_String_String_String_EntitiesNoName_b ($key, $field, $defaultVal, $desc, $ens, $uiIsEnable) // [String key, String field, String defaultVal, String desc, EntitiesNoName ens, boolean uiIsEnable]
	{
			/* match: String_String_Object_I_String_Entities_String_String_b */
		$this->AddDDLEntities_String_String_Object_I_String_Entities_String_String_b($key, $field, $defaultVal, $DataType->AppString, $desc, $ens, "No", "Name", $uiIsEnable);
	}
	public function AddDDLEntities_String_I_String_EntitiesOIDName_b ($key, $defaultVal, $desc, $ens, $uiIsEnable) // [String key, int defaultVal, String desc, EntitiesOIDName ens, boolean uiIsEnable]
	{
			/* match: String_String_Object_I_String_Entities_String_String_b */
		$this->AddDDLEntities_String_String_Object_I_String_Entities_String_String_b($key, $key, $defaultVal, $DataType->AppInt, $desc, $ens, "OID", "Name", $uiIsEnable);
	}
	public function AddDDLEntities_String_String_Object_String_EntitiesOIDName_b ($key, $field, $defaultVal, $desc, $ens, $uiIsEnable) // [String key, String field, Object defaultVal, String desc, EntitiesOIDName ens, boolean uiIsEnable]
	{
			/* match: String_String_Object_I_String_Entities_String_String_b */
		$this->AddDDLEntities_String_String_Object_I_String_Entities_String_String_b($key, $field, $defaultVal, $DataType->AppInt, $desc, $ens, "OID", "Name", $uiIsEnable);
	}
	protected function AddDDLEntities_String_String_Object_I_FieldType_String_Entities_String_String_b ($key, $field, $defaultVal, $dataType, $_fildType, $desc, $ens, $refKey, $refText, $uiIsEnable) // [String key, String field, Object defaultVal, int dataType, FieldType _fildType, String desc, Entities ens, String refKey, String refText, boolean uiIsEnable]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($dataType);
		$attr->setMyFieldType($_fildType);
		$attr->setMaxLength(50);
		$attr->setDesc($desc);
		$attr->setUIContralType(UIContralType::$DDL);
		$attr->setUIDDLShowType(DDLShowType::$Ens);
		$attr->setUIBindKey($ens);
		$attr->setHisFKEns($ens);
		$attr->setHisFKEns($ens);
		$attr->setUIRefKeyText($refText);
		$attr->setUIRefKeyValue($refKey);
		$attr->setUIIsReadonly($uiIsEnable);
			/* match: Attr_b_b */
		$this->getAttrs()->Add_Attr_b_b($attr,  TRUE , $this->IsAddRefName);
	}
	public function AddDDLEntities_String_String_Object_I_String_Entities_String_String_b ($key, $field, $defaultVal, $dataType, $desc, $ens, $refKey, $refText, $uiIsEnable) // [String key, String field, Object defaultVal, int dataType, String desc, Entities ens, String refKey, String refText, boolean uiIsEnable]
	{
			/* match: String_String_Object_I_FieldType_String_Entities_String_String_b */
		$this->AddDDLEntities_String_String_Object_I_FieldType_String_Entities_String_String_b($key, $field, $defaultVal, $dataType, FieldType::$FK, $desc, $ens, $refKey, $refText, $uiIsEnable);
	}
	public function AddDDLEntities_String_Object_I_String_Entities_String_String_b ($key, $defaultVal, $dataType, $desc, $ens, $refKey, $refText, $uiIsEnable) // [String key, Object defaultVal, int dataType, String desc, Entities ens, String refKey, String refText, boolean uiIsEnable]
	{
			/* match: String_String_Object_I_String_Entities_String_String_b */
		$this->AddDDLEntities_String_String_Object_I_String_Entities_String_String_b($key, $key, $defaultVal, $dataType, $desc, $ens, $refKey, $refText, $uiIsEnable);
	}
	public function AddDDLEntitiesPK_String_Object_I_String_EntitiesTree_b ($key, $defaultVal, $dataType, $desc, $ens, $uiIsEnable) // [String key, Object defaultVal, int dataType, String desc, EntitiesTree ens, boolean uiIsEnable]
	{
			/* match: String_String_Object_I_FieldType_String_Entities_String_String_b */
		$this->AddDDLEntities_String_String_Object_I_FieldType_String_Entities_String_String_b($key, $key, $defaultVal, $dataType, FieldType::$PKFK, $desc, $ens, "No", "Name", $uiIsEnable);
	}
	public function AddDDLEntitiesPK_String_Object_I_String_Entities_String_String_b ($key, $defaultVal, $dataType, $desc, $ens, $refKey, $refText, $uiIsEnable) // [String key, Object defaultVal, int dataType, String desc, Entities ens, String refKey, String refText, boolean uiIsEnable]
	{
			/* match: String_String_Object_I_FieldType_String_Entities_String_String_b */
		$this->AddDDLEntities_String_String_Object_I_FieldType_String_Entities_String_String_b($key, $key, $defaultVal, $dataType, FieldType::$PKFK, $desc, $ens, $refKey, $refText, $uiIsEnable);
	}
	public function AddDDLEntitiesPK_String_String_Object_I_String_Entities_String_String_b ($key, $field, $defaultVal, $dataType, $desc, $ens, $refKey, $refText, $uiIsEnable) // [String key, String field, Object defaultVal, int dataType, String desc, Entities ens, String refKey, String refText, boolean uiIsEnable]
	{
			/* match: String_String_Object_I_FieldType_String_Entities_String_String_b */
		$this->AddDDLEntities_String_String_Object_I_FieldType_String_Entities_String_String_b($key, $field, $defaultVal, $dataType, FieldType::$PKFK, $desc, $ens, $refKey, $refText, $uiIsEnable);
	}
	public function AddDDLEntitiesPK_String_String_String_String_EntitiesTree_b ($key, $field, $defaultVal, $desc, $ens, $uiIsEnable) // [String key, String field, String defaultVal, String desc, EntitiesTree ens, boolean uiIsEnable]
	{
			/* match: String_String_Object_I_FieldType_String_Entities_String_String_b */
		$this->AddDDLEntities_String_String_Object_I_FieldType_String_Entities_String_String_b($key, $field, $defaultVal, $DataType->AppString, FieldType::$PKFK, $desc, $ens, "No", "Name", $uiIsEnable);
	}
	public function AddDDLEntitiesPK_String_String_String_String_EntitiesNoName_b ($key, $field, $defaultVal, $desc, $ens, $uiIsEnable) // [String key, String field, String defaultVal, String desc, EntitiesNoName ens, boolean uiIsEnable]
	{
			/* match: String_String_Object_I_FieldType_String_Entities_String_String_b */
		$this->AddDDLEntities_String_String_Object_I_FieldType_String_Entities_String_String_b($key, $field, $defaultVal, $DataType->AppString, FieldType::$PKFK, $desc, $ens, "No", "Name", $uiIsEnable);
	}
	public function AddDDLEntitiesPK_String_String_String_EntitiesNoName_b ($key, $defaultVal, $desc, $ens, $uiIsEnable) // [String key, String defaultVal, String desc, EntitiesNoName ens, boolean uiIsEnable]
	{
		$this->AddDDLEntitiesPK_String_String_String_String_EntitiesNoName_b($key, $key, $defaultVal, $desc, $ens, $uiIsEnable);
	}
	public function AddDDLEntitiesPK_String_String_String_EntitiesTree_b ($key, $defaultVal, $desc, $ens, $uiIsEnable) // [String key, String defaultVal, String desc, EntitiesTree ens, boolean uiIsEnable]
	{
		$this->AddDDLEntitiesPK_String_String_String_String_EntitiesTree_b($key, $key, $defaultVal, $desc, $ens, $uiIsEnable);
	}
	protected function AddTBString_String_String_Object_FieldType_TBType_String_b_b_I_I_I_b ($key, $field, $defaultVal, $_FieldType, $tbType, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith, $isUILine) // [String key, String field, Object defaultVal, FieldType _FieldType, TBType tbType, String desc, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith, boolean isUILine]
	{
			/* match: String_String_Object_FieldType_TBType_String_b_b_I_I_I_b_String */
		$this->AddTBString_String_String_Object_FieldType_TBType_String_b_b_I_I_I_b_String($key, $field, $defaultVal, $_FieldType, $tbType, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith, $isUILine, NULL);
	}
	protected function AddTBString_String_String_Object_FieldType_TBType_String_b_b_I_I_I_b_String ($key, $field, $defaultVal, $_FieldType, $tbType, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith, $isUILine, $helpUrl) // [String key, String field, Object defaultVal, FieldType _FieldType, TBType tbType, String desc, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith, boolean isUILine, String helpUrl]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->HelperUrl = $helpUrl;
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppString);
		$attr->setDesc($desc);
		$attr->setUITBShowType($tbType);
		$attr->setUIVisible($uiVisable);
		$attr->setUIWidth($tbWith);
		$attr->setUIIsReadonly($isReadonly);
		$attr->setMaxLength($maxLength);
		$attr->setMinLength($minLength);
		$attr->setMyFieldType($_FieldType);
		$attr->UIIsLine = $isUILine;
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddAttrsFromMapData () 
	{
		if ($DataType->IsNullOrEmpty($this->getFK_MapData()))
		{
			throw new \RuntimeException("@您没有为map�? FK_MapData 赋�??.");
		}
		$md = NULL;
		$md = new MapData();
		$md->setNo($this->getFK_MapData());
		if (($md->RetrieveFromDBSources() == 0))
		{
			$md->setName($this->getFK_MapData());
			$md->setPTable($this->getPhysicsTable());
			$md->setEnPK($this->PKs);
			$md->Insert();
			$md->RepairMap();
		}
		$md->Retrieve();
		$attrs = new MapAttrs($this->getFK_MapData());
		foreach ($this->getAttrs() as $attr) 		{
			if ($attrs->Contains(MapAttrAttr->KeyOfEn, $attr->getKey()))
			{
				continue;
			}
			if ($attr->getIsRefAttr())
			{
				continue;
			}
			$mapattrN = $attr->getToMapAttr();
			$mapattrN->setFK_MapData($this->getFK_MapData());
			if (($mapattrN->getUIHeight() == 0))
			{
				$mapattrN->setUIHeight(23);
			}
			$mapattrN->Insert();
			$attrs->AddEntity($mapattrN);
		}
		foreach ($attrs->ToJavaList() as $attr) 		{
			if (($this->getAttrs()->Contains($attr->getKeyOfEn()) ==  TRUE ))
				continue;
			/* match: Attr */
			$this->AddAttr_Attr($attr->getHisAttr());
		}
	}
	public function AddAttrs ($attrs) // [Attrs attrs]
	{
		foreach ($attrs as $attr) 		{
			if ($attr->getIsRefAttr())
			{
				continue;
			}
			/* match: Attr */
			$this->getAttrs()->Add_Attr($attr);
		}
	}
	public function AddAttr_Attr ($attr) // [Attr attr]
	{
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddAttr_String_Object_I_b_String ($key, $defaultVal, $dbtype, $isPk, $desc) // [String key, Object defaultVal, int dbtype, boolean isPk, String desc]
	{
		if ($isPk)
		{
			/* match: String_String_String_b_b_I_I_I */
			$this->AddTBStringPK_String_String_String_b_b_I_I_I($key, $key, $desc,  TRUE ,  FALSE , 0, 1000, 100);
		}
		else
		{
			/* match: String_String_Object_FieldType_TBType_String_b_b_I_I_I_b */
			$this->AddTBString_String_String_Object_FieldType_TBType_String_b_b_I_I_I_b($key, $key, $defaultVal, FieldType::$Normal, $TBType->TB, $desc,  TRUE ,  FALSE , 0, 1000, 100,  FALSE );
		}
	}
	public function AddTBString_String_String_String_b_b_I_I_I ($key, $defaultVal, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith) // [String key, String defaultVal, String desc, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith]
	{
			/* match: String_String_Object_FieldType_TBType_String_b_b_I_I_I_b */
		$this->AddTBString_String_String_Object_FieldType_TBType_String_b_b_I_I_I_b($key, $key, $defaultVal, FieldType::$Normal, $TBType->TB, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith,  FALSE );
	}
	public function AddTBString_String_String_Object_String_b_b_I_I_I ($key, $field, $defaultVal, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith) // [String key, String field, Object defaultVal, String desc, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith]
	{
			/* match: String_String_Object_FieldType_TBType_String_b_b_I_I_I_b */
		$this->AddTBString_String_String_Object_FieldType_TBType_String_b_b_I_I_I_b($key, $field, $defaultVal, FieldType::$Normal, $TBType->TB, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith,  FALSE );
	}
	public function AddTBString_String_String_String_b_b_I_I_I_b ($key, $defaultVal, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith, $isUILine) // [String key, String defaultVal, String desc, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith, boolean isUILine]
	{
			/* match: String_String_Object_FieldType_TBType_String_b_b_I_I_I_b */
		$this->AddTBString_String_String_Object_FieldType_TBType_String_b_b_I_I_I_b($key, $key, $defaultVal, FieldType::$Normal, $TBType->TB, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith, $isUILine);
	}
	public function AddTBString_String_String_String_b_b_I_I_I_b_String ($key, $defaultVal, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith, $isUILine, $helpUrl) // [String key, String defaultVal, String desc, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith, boolean isUILine, String helpUrl]
	{
			/* match: String_String_Object_FieldType_TBType_String_b_b_I_I_I_b_String */
		$this->AddTBString_String_String_Object_FieldType_TBType_String_b_b_I_I_I_b_String($key, $key, $defaultVal, FieldType::$Normal, $TBType->TB, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith, $isUILine, $helpUrl);
	}
	public function AddMyFileS () 
	{
			/* match: String_I_String_b_b */
		$this->AddTBInt_String_I_String_b_b(EntityNoMyFileAttr::$MyFileNum, 0, "附件",  FALSE ,  FALSE );
		$this->HisBPEntityAthType = BPEntityAthType::$Multi;
	}
	public function AddMyFileS_String ($desc) // [String desc]
	{
			/* match: String_I_String_b_b */
		$this->AddTBInt_String_I_String_b_b(EntityNoMyFileAttr::$MyFileNum, 0, $desc,  FALSE ,  FALSE );
		$this->HisBPEntityAthType = BPEntityAthType::$Multi;
	}
	public function AddMyFile_String ($fileDesc) // [String fileDesc]
	{
			/* match: String_String_String */
		$this->AddMyFile_String_String_String($fileDesc, NULL, NULL);
	}
	public function AddMyFile () 
	{
			/* match: String_String_String */
		$this->AddMyFile_String_String_String(NULL, NULL, NULL);
	}
	public function AddMyFile_String_String_String ($fileDesc, $ext, $savePath) // [String fileDesc, String ext, String savePath]
	{
		if (($fileDesc . NULL))
		{
			$fileDesc = "附件或图�?";
		}
			/* match: String_String_String_b_b_I_I_I */
		$this->AddTBString_String_String_String_b_b_I_I_I(EntityNoMyFileAttr::$MyFileName, NULL, $fileDesc,  FALSE ,  FALSE , 0, 300, 200);
			/* match: String_String_String_b_b_I_I_I */
		$this->AddTBString_String_String_String_b_b_I_I_I(EntityNoMyFileAttr::$MyFilePath, NULL, "MyFilePath",  FALSE ,  FALSE , 0, 300, 200);
			/* match: String_String_String_b_b_I_I_I */
		$this->AddTBString_String_String_String_b_b_I_I_I(EntityNoMyFileAttr::$MyFileExt, NULL, "MyFileExt",  FALSE ,  FALSE , 0, 20, 10);
			/* match: String_String_String_b_b_I_I_I */
		$this->AddTBString_String_String_String_b_b_I_I_I(EntityNoMyFileAttr::$WebPath, NULL, "WebPath",  FALSE ,  FALSE , 0, 300, 10);
			/* match: String_I_String_b_b */
		$this->AddTBInt_String_I_String_b_b(EntityNoMyFileAttr::$MyFileH, 0, "MyFileH",  FALSE ,  FALSE );
			/* match: String_I_String_b_b */
		$this->AddTBInt_String_I_String_b_b(EntityNoMyFileAttr::$MyFileW, 0, "MyFileW",  FALSE ,  FALSE );
			/* match: String_F_String_b_b */
		$this->AddTBFloat_String_F_String_b_b("MyFileSize", 0, "MyFileSize",  FALSE ,  FALSE );
		$this->HisBPEntityAthType = BPEntityAthType::$Single;
		$this->FJSavePath = $savePath;
	}
	public function getHisAttrFiles () 
	{
		if (($this->_HisAttrFiles == NULL))
		{
			$this->_HisAttrFiles = AttrFiles::constructor__();
		}
		return $this->_HisAttrFiles;
	}
	public function AddMyFile_String_String ($fileDesc, $fExt) // [String fileDesc, String fExt]
	{
		$this->getHisAttrFiles()->Add($fExt, $fileDesc);
		$this->HisBPEntityAthType = BPEntityAthType::$Single;
			/* match: String_String_String */
		$this->AddMyFile_String_String_String($fileDesc, $fExt, NULL);
	}
	public function AddTBStringDoc () 
	{
			/* match: String_String_String_String_b_b_I_I_I_I_b */
		$this->AddTBStringDoc_String_String_String_String_b_b_I_I_I_I_b("Doc", "Doc", NULL, "内容",  TRUE ,  FALSE , 0, 4000, 300, 300,  TRUE );
	}
	public function AddTBStringDoc_String_String_String_b_b_b ($key, $defaultVal, $desc, $uiVisable, $isReadonly, $isUILine) // [String key, String defaultVal, String desc, boolean uiVisable, boolean isReadonly, boolean isUILine]
	{
			/* match: String_String_String_String_b_b_I_I_I_I_b */
		$this->AddTBStringDoc_String_String_String_String_b_b_I_I_I_I_b($key, $key, $defaultVal, $desc, $uiVisable, $isReadonly, 0, 4000, 300, 10, $isUILine);
	}
	public function AddTBStringDoc_String_String_String_b_b ($key, $defaultVal, $desc, $uiVisable, $isReadonly) // [String key, String defaultVal, String desc, boolean uiVisable, boolean isReadonly]
	{
			/* match: String_String_String_String_b_b_I_I_I_I_b */
		$this->AddTBStringDoc_String_String_String_String_b_b_I_I_I_I_b($key, $key, $defaultVal, $desc, $uiVisable, $isReadonly, 0, 4000, 300, 10,  FALSE );
	}
	public function AddTBStringDoc_String_String_String_b_b_I_I_I_I ($key, $defaultVal, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith, $rows) // [String key, String defaultVal, String desc, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith, int rows]
	{
			/* match: String_String_String_String_b_b_I_I_I_I_b */
		$this->AddTBStringDoc_String_String_String_String_b_b_I_I_I_I_b($key, $key, $defaultVal, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith, $rows,  FALSE );
	}
	public function AddTBStringDoc_String_String_String_String_b_b_I_I_I_I_b ($key, $field, $defaultVal, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith, $rows, $isUILine) // [String key, String field, String defaultVal, String desc, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith, int rows, boolean isUILine]
	{
		if (($field . NULL))
		{
			$field = $key;
		}
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppString);
		$attr->setDesc($desc);
		$attr->setUITBShowType($TBType->TB);
		$attr->setUIVisible($uiVisable);
		$attr->setUIWidth(300);
		$attr->setUIIsReadonly($isReadonly);
		$attr->setMaxLength(4000);
		$attr->setMinLength($minLength);
		$attr->setMyFieldType(FieldType::$Normal);
		$attr->setUIHeight($rows);
		$attr->UIIsLine = $isUILine;
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddTBStringPK_String_String_String_b_b_I_I_I ($key, $defaultVal, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith) // [String key, String defaultVal, String desc, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith]
	{
		$this->PKs = $key;
			/* match: String_String_Object_FieldType_TBType_String_b_b_I_I_I_b */
		$this->AddTBString_String_String_Object_FieldType_TBType_String_b_b_I_I_I_b($key, $key, $defaultVal, FieldType::$PK, $TBType->TB, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith,  FALSE );
	}
	public function AddTBStringPK_String_String_Object_String_b_b_I_I_I ($key, $field, $defaultVal, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith) // [String key, String field, Object defaultVal, String desc, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith]
	{
		$this->PKs = $key;
			/* match: String_String_Object_FieldType_TBType_String_b_b_I_I_I_b */
		$this->AddTBString_String_String_Object_FieldType_TBType_String_b_b_I_I_I_b($key, $field, $defaultVal, FieldType::$PK, $TBType->TB, $desc, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith,  FALSE );
	}
	public function AddTBStringFKEns_String_String_String_String_Entities_String_String_b_b_I_I_I ($key, $field, $defaultVal, $desc, $ens, $refKey, $refText, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith) // [String key, String field, String defaultVal, String desc, Entities ens, String refKey, String refText, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppString);
		$attr->setUIBindKey($ens);
		$attr->setHisFKEns($ens);
		$attr->setDesc($desc);
		$attr->setUITBShowType($TBType->Ens);
		$attr->setUIVisible($uiVisable);
		$attr->setUIWidth($tbWith);
		$attr->setUIIsReadonly($isReadonly);
		$attr->setMaxLength($maxLength);
		$attr->setMinLength($minLength);
		$attr->setUIRefKeyValue($refKey);
		$attr->setUIRefKeyText($refText);
		$attr->setMyFieldType(FieldType::$FK);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddTBStringFKEns_String_String_String_Entities_String_String_b_b_I_I_I ($key, $defaultVal, $desc, $ens, $refKey, $refText, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith) // [String key, String defaultVal, String desc, Entities ens, String refKey, String refText, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith]
	{
			/* match: String_String_String_String_Entities_String_String_b_b_I_I_I */
		$this->AddTBStringFKEns_String_String_String_String_Entities_String_String_b_b_I_I_I($key, $key, $defaultVal, $desc, $ens, $refKey, $refText, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith);
	}
	public function AddTBMultiValues ($key, $field, $defaultVal, $desc, $ens, $refValue, $refText, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith) // [String key, String field, Object defaultVal, String desc, Entities ens, String refValue, String refText, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppString);
		$attr->setUIBindKey($ens);
		$attr->setHisFKEns($ens);
		$attr->setDesc($desc);
		$attr->setUITBShowType($TBType->Ens);
		$attr->setUIVisible($uiVisable);
		$attr->setUIWidth($tbWith);
		$attr->setUIIsReadonly($isReadonly);
		$attr->setUIRefKeyText($refText);
		$attr->setUIRefKeyValue($refValue);
		$attr->setMaxLength($maxLength);
		$attr->setMinLength($minLength);
		$attr->setMyFieldType(FieldType::$MultiValues);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddTBStringPKEns_String_String_Object_String_Entities_String_String_b_b_I_I_I ($key, $field, $defaultVal, $desc, $ens, $refVal, $refText, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith) // [String key, String field, Object defaultVal, String desc, Entities ens, String refVal, String refText, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppString);
		$attr->setUIBindKey($ens);
		$attr->setHisFKEns($attr->getHisFKEns());
		$attr->setDesc($desc);
		$attr->setUITBShowType($TBType->Ens);
		$attr->setUIVisible($uiVisable);
		$attr->setUIWidth($tbWith);
		$attr->setUIIsReadonly($isReadonly);
		$attr->setUIRefKeyText($refText);
		$attr->setUIRefKeyValue($refVal);
		$attr->setMaxLength($maxLength);
		$attr->setMinLength($minLength);
		$attr->setMyFieldType(FieldType::$PKFK);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddTBStringPKEns_String_String_String_Entities_String_String_b_b_I_I_I ($key, $defaultVal, $desc, $ens, $refKey, $refText, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith) // [String key, String defaultVal, String desc, Entities ens, String refKey, String refText, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith]
	{
			/* match: String_String_Object_String_Entities_String_String_b_b_I_I_I */
		$this->AddTBStringPKEns_String_String_Object_String_Entities_String_String_b_b_I_I_I($key, $key, $defaultVal, $desc, $ens, $refKey, $refText, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith);
	}
	public function AddTBStringPKSelf_String_String_Object_String_String_b_b_I_I_I ($key, $field, $defaultVal, $desc, $DataHelpKey, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith) // [String key, String field, Object defaultVal, String desc, String DataHelpKey, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppString);
		$attr->setUIBindKey($DataHelpKey);
		$attr->setDesc($desc);
		$attr->setUITBShowType($TBType->Self);
		$attr->setUIVisible($uiVisable);
		$attr->setUIWidth($tbWith);
		$attr->setUIIsReadonly($isReadonly);
		$attr->setMaxLength($maxLength);
		$attr->setMinLength($minLength);
		$attr->setMyFieldType(FieldType::$PK);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddTBStringPKSelf_String_Object_String_String_b_b_I_I_I ($key, $defaultVal, $desc, $DataHelpKey, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith) // [String key, Object defaultVal, String desc, String DataHelpKey, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith]
	{
			/* match: String_String_Object_String_String_b_b_I_I_I */
		$this->AddTBStringPKSelf_String_String_Object_String_String_b_b_I_I_I($key, $key, $defaultVal, $desc, $DataHelpKey, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith);
	}
	public function AddTBStringFKSelf_String_String_Object_String_String_b_b_I_I_I ($key, $field, $defaultVal, $desc, $DataHelpKey, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith) // [String key, String field, Object defaultVal, String desc, String DataHelpKey, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppString);
		$attr->setUIBindKey($DataHelpKey);
		$attr->setDesc($desc);
		$attr->setUITBShowType($TBType->Self);
		$attr->setUIVisible($uiVisable);
		$attr->setUIWidth($tbWith);
		$attr->setUIIsReadonly($isReadonly);
		$attr->setMaxLength($maxLength);
		$attr->setMinLength($minLength);
		$attr->setMyFieldType(FieldType::$Normal);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddTBStringFKSelf_String_Object_String_String_b_b_I_I_I ($key, $defaultVal, $desc, $DataHelpKey, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith) // [String key, Object defaultVal, String desc, String DataHelpKey, boolean uiVisable, boolean isReadonly, int minLength, int maxLength, int tbWith]
	{
			/* match: String_String_Object_String_String_b_b_I_I_I */
		$this->AddTBStringFKSelf_String_String_Object_String_String_b_b_I_I_I($key, $key, $defaultVal, $desc, $DataHelpKey, $uiVisable, $isReadonly, $minLength, $maxLength, $tbWith);
	}
	abstract function AddTBStringFKValue ($refKey, $key, $desc, $IsVisable, $with); // [String refKey, String key, String desc, boolean IsVisable, int with]
	public function AddTBDate_String ($key) // [String key]
	{
		switch ($key) {
			case "RDT":
			/* match: String_String_b_b */
				$this->AddTBDate_String_String_b_b("RDT", "记录日期",  TRUE ,  TRUE );
				break;
			case "UDT":
			/* match: String_String_b_b */
				$this->AddTBDate_String_String_b_b("UDT", "更新日期",  TRUE ,  TRUE );
				break;
			default:
			/* match: String_String_b_b */
				$this->AddTBDate_String_String_b_b($key, $key,  TRUE ,  TRUE );
				break;
		}
	}
	public function AddTBDate_String_String_String_String_b_b ($key, $field, $defaultVal, $desc, $uiVisable, $isReadonly) // [String key, String field, String defaultVal, String desc, boolean uiVisable, boolean isReadonly]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppDate);
		$attr->setDesc($desc);
		$attr->setUITBShowType($TBType->Date);
		$attr->setUIVisible($uiVisable);
		$attr->setUIIsReadonly($isReadonly);
		$attr->setMaxLength(50);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddTBDate_String_String_String_b_b ($key, $defaultVal, $desc, $uiVisable, $isReadonly) // [String key, String defaultVal, String desc, boolean uiVisable, boolean isReadonly]
	{
			/* match: String_String_String_String_b_b */
		$this->AddTBDate_String_String_String_String_b_b($key, $key, $defaultVal, $desc, $uiVisable, $isReadonly);
	}
	public function AddTBDate_String_String_b_b ($key, $desc, $uiVisable, $isReadonly) // [String key, String desc, boolean uiVisable, boolean isReadonly]
	{
			/* match: String_String_String_String_b_b */
		$this->AddTBDate_String_String_String_String_b_b($key, $key, $DateUtils->format(new Date(), $DataType->getSysDataFormat()), $desc, $uiVisable, $isReadonly);
	}
	public function AddTBDateTime_String_String_String_String_b_b ($key, $field, $defaultVal, $desc, $uiVisable, $isReadonly) // [String key, String field, String defaultVal, String desc, boolean uiVisable, boolean isReadonly]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppDateTime);
		$attr->setDesc($desc);
		$attr->setUITBShowType($TBType->DateTime);
		$attr->setUIVisible($uiVisable);
		$attr->setUIIsReadonly($isReadonly);
		$attr->setMaxLength(50);
		$attr->setUIWidth(100);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddTBDateTime_String_String_String_b_b ($key, $defaultVal, $desc, $uiVisable, $isReadonly) // [String key, String defaultVal, String desc, boolean uiVisable, boolean isReadonly]
	{
			/* match: String_String_String_String_b_b */
		$this->AddTBDateTime_String_String_String_String_b_b($key, $key, $defaultVal, $desc, $uiVisable, $isReadonly);
	}
	public function AddTBDateTime_String_String_b_b ($key, $desc, $uiVisable, $isReadonly) // [String key, String desc, boolean uiVisable, boolean isReadonly]
	{
			/* match: String_String_String_String_b_b */
		$this->AddTBDateTime_String_String_String_String_b_b($key, $key, $DateUtils->format(new Date(), $DataType->getSysDataTimeFormat()), $desc, $uiVisable, $isReadonly);
	}
	public function AddTBMoney_String_String_F_String_b_b ($key, $field, $defaultVal, $desc, $uiVisable, $isReadonly) // [String key, String field, float defaultVal, String desc, boolean uiVisable, boolean isReadonly]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppMoney);
		$attr->setDesc($desc);
		$attr->setUITBShowType($TBType->Moneny);
		$attr->setUIVisible($uiVisable);
		$attr->setUIIsReadonly($isReadonly);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddTBMoney_String_F_String_b_b ($key, $defaultVal, $desc, $uiVisable, $isReadonly) // [String key, float defaultVal, String desc, boolean uiVisable, boolean isReadonly]
	{
			/* match: String_String_F_String_b_b */
		$this->AddTBMoney_String_String_F_String_b_b($key, $key, $defaultVal, $desc, $uiVisable, $isReadonly);
	}
	public function AddTBInt_String_String_I_String_b_b ($key, $_Field, $defaultVal, $desc, $uiVisable, $isReadonly) // [String key, String _Field, int defaultVal, String desc, boolean uiVisable, boolean isReadonly]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($_Field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppInt);
		$attr->setMyFieldType(FieldType::$Normal);
		$attr->setDesc($desc);
		$attr->setUITBShowType($TBType->Int);
		$attr->setUIVisible($uiVisable);
		$attr->setUIIsReadonly($isReadonly);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddTBInt_String_I_String_b_b ($key, $defaultVal, $desc, $uiVisable, $isReadonly) // [String key, int defaultVal, String desc, boolean uiVisable, boolean isReadonly]
	{
			/* match: String_String_I_String_b_b */
		$this->AddTBInt_String_String_I_String_b_b($key, $key, $defaultVal, $desc, $uiVisable, $isReadonly);
	}
	public function AddTBIntPK_String_String_I_String_b_b_b ($key, $_Field, $defaultVal, $desc, $uiVisable, $isReadonly, $identityKey) // [String key, String _Field, int defaultVal, String desc, boolean uiVisable, boolean isReadonly, boolean identityKey]
	{
		$this->PKs = $key;
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($_Field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppInt);
		$attr->setMyFieldType(FieldType::$PK);
		$attr->setDesc($desc);
		$attr->setUITBShowType($TBType->Int);
		$attr->setUIVisible($uiVisable);
		$attr->setUIIsReadonly($isReadonly);
		if ($identityKey)
		{
			$attr->setUIBindKey("1");
		}
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddTBIntPKOID_String_String ($_field, $desc) // [String _field, String desc]
	{
			/* match: String_String_I_String_b_b_b */
		$this->AddTBIntPK_String_String_I_String_b_b_b("OID", $_field, 0, "OID",  FALSE ,  TRUE ,  FALSE );
	}
	public function AddTBIntPKOID () 
	{
			/* match: String_String */
		$this->AddTBIntPKOID_String_String("OID", "OID");
	}
	public function AddTBMyNum_String ($desc) // [String desc]
	{
			/* match: String_I_String_b_b */
		$this->AddTBInt_String_I_String_b_b("MyNum", 1, $desc,  TRUE ,  TRUE );
	}
	public function AddTBMyNum () 
	{
			/* match: String_I_String_b_b */
		$this->AddTBInt_String_I_String_b_b("MyNum", 1, "个数",  TRUE ,  TRUE );
	}
	public function AddTBAtParas ($fieldLength) // [int fieldLength]
	{
			/* match: String_String_String_b_b_I_I_I */
		$this->AddTBString_String_String_String_b_b_I_I_I("AtPara", NULL, "AtPara",  FALSE ,  TRUE , 0, $fieldLength, 10);
	}
	public function AddMyPK () 
	{
			/* match: b */
		$this->AddMyPK_b( TRUE );
	}
	public function AddMyPK_b ($uiVisable) // [boolean uiVisable]
	{
		$this->PKs = "MyPK";
			/* match: String_String_String_b_b_I_I_I */
		$this->AddTBStringPK_String_String_String_b_b_I_I_I("MyPK", NULL, "主键MyPK", $uiVisable,  TRUE , 1, 100, 10);
	}
	public function AddAID () 
	{
		$attr = Attr::constructor__();
		$attr->setKey("AID");
		$attr->setField("AID");
		$attr->setDefaultVal(NULL);
		$attr->setMyDataType($DataType->AppInt);
		$attr->setMyFieldType(FieldType::$PK);
		$attr->setDesc("AID");
		$attr->setUITBShowType($TBType->TB);
		$attr->setUIVisible( FALSE );
		$attr->setUIIsReadonly( TRUE );
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddTBIntPK_String_I_String_b_b ($key, $defaultVal, $desc, $uiVisable, $isReadonly) // [String key, int defaultVal, String desc, boolean uiVisable, boolean isReadonly]
	{
			/* match: String_String_I_String_b_b_b */
		$this->AddTBIntPK_String_String_I_String_b_b_b($key, $key, $defaultVal, $desc, $uiVisable, $isReadonly,  FALSE );
	}
	public function AddTBIntPK_String_I_String_b_b_b ($key, $defaultVal, $desc, $uiVisable, $isReadonly, $identityKey) // [String key, int defaultVal, String desc, boolean uiVisable, boolean isReadonly, boolean identityKey]
	{
			/* match: String_String_I_String_b_b_b */
		$this->AddTBIntPK_String_String_I_String_b_b_b($key, $key, $defaultVal, $desc, $uiVisable, $isReadonly, $identityKey);
	}
	public function AddTBIntMyNum () 
	{
			/* match: String_String_I_String_b_b */
		$this->AddTBInt_String_String_I_String_b_b("MyNum", "MyNum", 1, "个数",  TRUE ,  TRUE );
	}
	public function AddTBFloat_String_String_F_String_b_b ($key, $_Field, $defaultVal, $desc, $uiVisable, $isReadonly) // [String key, String _Field, float defaultVal, String desc, boolean uiVisable, boolean isReadonly]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($_Field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppFloat);
		$attr->setDesc($desc);
		$attr->setUITBShowType($TBType->Num);
		$attr->setUIVisible($uiVisable);
		$attr->setUIIsReadonly($isReadonly);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddTBFloat_String_F_String_b_b ($key, $defaultVal, $desc, $uiVisable, $isReadonly) // [String key, float defaultVal, String desc, boolean uiVisable, boolean isReadonly]
	{
			/* match: String_String_F_String_b_b */
		$this->AddTBFloat_String_String_F_String_b_b($key, $key, $defaultVal, $desc, $uiVisable, $isReadonly);
	}
	public function AddTBDecimal_String_String_I_String_b_b ($key, $_Field, $defaultVal, $desc, $uiVisable, $isReadonly) // [String key, String _Field, int defaultVal, String desc, boolean uiVisable, boolean isReadonly]
	{
		$attr = Attr::constructor__();
		$attr->setKey($key);
		$attr->setField($_Field);
		$attr->setDefaultVal($defaultVal);
		$attr->setMyDataType($DataType->AppDouble);
		$attr->setDesc($desc);
		$attr->setUITBShowType($TBType->Decimal);
		$attr->setUIVisible($uiVisable);
		$attr->setUIIsReadonly($isReadonly);
			/* match: Attr */
		$this->getAttrs()->Add_Attr($attr);
	}
	public function AddTBDecimal_String_I_String_b_b ($key, $defaultVal, $desc, $uiVisable, $isReadonly) // [String key, int defaultVal, String desc, boolean uiVisable, boolean isReadonly]
	{
			/* match: String_String_I_String_b_b */
		$this->AddTBDecimal_String_String_I_String_b_b($key, $key, $defaultVal, $desc, $uiVisable, $isReadonly);
	}
}
?>
